﻿package com.petermacko.utils {
	import flash.net.*;
	import flash.system.Capabilities;

	public class BrowserUtil
	{
		public static function getURL(url:String):void {
			if("*"==url.substr(-1,1)) {
				navigateToURL(new URLRequest(url.substr(0,-1)),"_blank");
			} else {
				navigateToURL(new URLRequest(url),"_self");
			}
		}

		public static function download(url:String):void {
			if("ActiveX"==Capabilities.playerType) {
				navigateToURL(new URLRequest(url),"_blank");
			} else {
				navigateToURL(new URLRequest(url),"_self");
			}
		}
	}
}
